#ifndef EDEPARTMENTCHANGEVIEW_H
#define EDEPARTMENTCHANGEVIEW_H

#include <QWidget>
#include <QComboBox>
#include <QTextEdit>
#include <QPushButton>
#include <QTableWidget>
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include "employeemanager.h"

class EDepartmentChangeView : public QWidget
{
    Q_OBJECT
public:
    explicit EDepartmentChangeView(EmployeeManager *employeeManager, const QString &empId, QWidget *parent = nullptr);
    void initUI();
    void loadDepartments();
    void loadRequestHistory();

signals:
    void requestSubmitted(bool success);

private slots:
    void onSubmitRequest();
    void onCancelRequest();
    void onRequestTableItemClicked(int row, int column);

private:
    EmployeeManager *m_employeeManager;
    QString m_empId;
    QComboBox *m_deptComboBox;
    QTextEdit *m_reasonTextEdit;
    QPushButton *m_submitButton;
    QTableWidget *m_requestTableWidget;
    QLabel *m_statusLabel;
    int m_selectedRequestId;

};

#endif // EDEPARTMENTCHANGEVIEW_H
